package com.fansl.koala.quickdev.module.users.service.impl;

import com.fansl.koala.quickdev.module.users.entity.SysUserMenu;
import com.fansl.koala.quickdev.module.users.mapper.SysUserMenuMapper;
import com.fansl.koala.quickdev.module.users.service.ISysUserMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author fansl
 * @since 2020-04-08
 */
@Service
public class SysUserMenuServiceImpl extends ServiceImpl<SysUserMenuMapper, SysUserMenu> implements ISysUserMenuService {

    /**
     * 取用户自定义的菜单ID
     *
     * @param userId 用户id
     * @param type   权限类型（1-加权限2-减权限）
     * @return
     */
    @Override
    public List<Integer> listMenusByType(Long userId, String type) {
        return baseMapper.listMenusByType(userId,type);
    }
}
